package com.cizzy.favorite.feign;

import com.cizzy.favorite.common.Result;
import com.cizzy.favorite.entity.dao.VideoCountDAO;
import com.cizzy.favorite.entity.dto.VideoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("video-server-service")
public interface VideoFeign {
    /**
     * 通过ID 数组查找相应的视频数组
     *
     * @param videoIds 视频ID 集合
     * @return 视频集合
     */
    @PostMapping("/video/getVideoListByIds")
    Result<List<VideoDTO>> getVideoListByIds(@RequestBody List<Long> videoIds);

    @PostMapping("/videoCount/addVideoCountById")
    Result<VideoCountDAO> addVideoCountById(@RequestParam("column") String column, @RequestParam("id") Long id, @RequestParam("count") Integer count);
}
